/**
 * Created by Administrator on 2018/6/19.
 */
$CertusJsonAjax.ajax("queryBidProcessTrace",{
    "processInstanceId": $CertusJsonAjax.getProInstanceId(),
    "stepInstanceId": $CertusJsonAjax.getStepInstanceId()
},function(res){
    $$scope.processCCBXTrace = res.data;
})
var count = 0;
$CertusJsonAjax.ajax('bidBaseInfo', {
    "processInstanceId": $CertusJsonAjax.getProInstanceId(),
    "stepInstanceId": $CertusJsonAjax.getStepInstanceId()
}, function (res) {
    $$scope.bid = res.data;
    $$scope.bid.processInstanceId = $CertusJsonAjax.getProInstanceId();
    $$scope.bid.stepInstanceId = $CertusJsonAjax.getStepInstanceId();
    $$scope.bid.specifiedMans = {}
})

// $$scope.bid.specifiedMans = {};
$$scope.submit = function () {
        $$scope.bid.specifiedMan = $$scope.bid.proNumber;
        $$scope.bid.nameOfPage = "销售领导审核";
        $CertusJsonAjax.ajax("bidSubmit", $$scope.bid, function (res) {
            history.back();
    })
}

$$scope.shutdown = function () {
    $CertusJsonAjax.ajax("bidshutdown", $$scope.bid, function (res) {
        history.back();
    })
}

$$scope.formSubmitted = function () {
    var form = new FormData();
    var file = document.getElementById("fileUploadId").files[0];
    form.append('file', file);
    form.append('bbb', "ccc");
    $CertusJsonAjax.upload("processUploadFile", form, function (res) {
        $scope.bid.uploadFilePath = "selbidA" + "@" + res.data;
        $scope.bid.
        $CertusJsonAjax.ajax("bidSubmit", $scope.bidBaseInfo, function (res) {
            parent.window.layer.closeAll();
        })
    })
}

$$scope.bidDenied = function () {
    $CertusJsonAjax.ajax("bidDenied", $$scope.bid, function (res) {
        history.back();
    })
}
